meson: Always look for both cmake and pkgconfig names
authorNirbheek Chauhan <nirbheek@centricular.com>
Sun, 18 Dec 2022 01:24:44 +0000 (06:54 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Sun, 18 Dec 2022 16:12:03 +0000 (21:42 +0530)
commitcc6b0c5750e3cbb1a8b85f626332033934c91956
tree479d486705a54643cfa6786eb31e4f621791febf
parent235f01952ce205ed152c7a70758fb6e8f0eba77e
meson: Always look for both cmake and pkgconfig names

The is_msvc_like change is wrong; it used a false correlation between
"compiler being used" and "dependency method" by saying that on
Windows, when building with MSVC, you will only use CMake to find png,
jpeg, tiff.

You can use pkgconfig to find these deps on Windows with MSVC -- when
the deps have been built with Autotools or Meson (with MSVC). You can
also find these deps using CMake on other platforms like macOS or
Linux.

The solution is simple: just search for both names on all platforms,
and just search for the pkgconfig name first.
meson.build